/*
 * cgresult_access.c
 *
 *  Created on: 2012/07/03
 *      Author: guanxiaoying
 */
#include "../coredef.h"
#include "../cg/cg.h"
#include "../cc/cc.h"
//TYPE_TRANSLATIONUNIT DLL_EXPORT LinkTranslationUnit;
//EXTERNAL_SYMBOL(LinkTranslationUnit );
//VOID LinkTranslationUnitInit( VOID ){
//	AST  (*getMax)( VOID );
//	LinkTranslationUnit.getMax = stCoreTranslationUnitAccess.getMax;
//	AST  (*getDeclaration)( AST astIndex );
//	LinkTranslationUnit.getDeclaration = stCoreTranslationUnitAccess.declarationchain.get;
//}
TYPE_STRINGS DLL_EXPORT LinkStrings;
EXTERNAL_SYMBOL(LinkStrings );
VOID LinkStringsInit( VOID ){
//	PSZ (*getString)( AST );
	LinkStrings.getString = stCcConstStringAccess.getStr;
//	S4 (*getLength)( AST );
	LinkStrings.getLength = stCcConstStringAccess.getLength;
}
TYPE_MEMBERINFO DLL_EXPORT LinkMember;
EXTERNAL_SYMBOL(LinkMember );
static BOOL isMemSymRegister( AST  astIndex ){
	return (CLASS_REGISTER == stMemberSymbolAccess.symClass.get( astIndex ));
}
VOID LinkMemberInit( VOID ){
	LinkMember.getMax = stMemberSymbolAccess.getMax;
	LinkMember.isRegister = isMemSymRegister;
	LinkMember.getType = stMemberSymbolAccess.type.get;
	LinkMember.getName = stMemberSymbolAccess.name.get;
	LinkMember.getCodeScope = stMemberSymbolAccess.codeScp.get;
	LinkMember.getValue = stMemberSymbolAccess.value.get;
	LinkMember.getOffsetSize = stMemberSymbolAccess.memOffset.get;
	LinkMember.getNextMember = stMemberSymbolAccess.next.get;
}
TYPE_CONSTANTINFO DLL_EXPORT  LinkConstant;
EXTERNAL_SYMBOL(LinkConstant );
static INTVALUE getIntLinkConstant( AST  astIndex ){
	INTVALUE intvar;
	VARVALUE var = stConstantAccess.getInteger( astIndex );
	intvar.sign = 1;
	if( var.sign < 0 ){
		intvar.sign = -1;
	}
	intvar.u8Remainder = var.u8Remainder;
	return intvar;
}

VOID LinkConstantInit( VOID ){
	LinkConstant.getMax = stConstantAccess.getMax;
	LinkConstant.isNegative = stConstantAccess.isNegative;
	LinkConstant.isSigned = stConstantAccess.isSigned;
	LinkConstant.isFloating = stConstantAccess.isFloating;
	LinkConstant.getSize = stConstantAccess.getSize;
	LinkConstant.getInteger = getIntLinkConstant;
	LinkConstant.getFloating = stConstantAccess.getFloating;
}
TYPE_GBLLINKAGE DLL_EXPORT  LinkLinkage;
EXTERNAL_SYMBOL(LinkLinkage );

VOID LinkGblLinkageInit( VOID ){
	LinkLinkage.getMax = stGblLinkageAccess.getMax;
	LinkLinkage.isExternal = stGblLinkageAccess.bExternal.get;
	LinkLinkage.isReferred = stGblLinkageAccess.refer.get;
	LinkLinkage.getParameter = stGblLinkageAccess.vari.get;
	LinkLinkage.isFunction = stGblLinkageAccess.bFunction.get;
}
TYPE_VARIABLE DLL_EXPORT  LinkVariable;
EXTERNAL_SYMBOL(LinkVariable );

static BOOL isVariRegister( AST  astIndex ){
	return (CLASS_REGISTER == stVariableInfoAccess.symClass.get( astIndex ));
}
static BOOL isVariExtern( AST  astIndex ){
	return (CLASS_EXTERN == stVariableInfoAccess.symClass.get( astIndex ));
}
static BOOL isVariStatic( AST  astIndex ){
	return (CLASS_STATIC == stVariableInfoAccess.symClass.get( astIndex ));
}
static BOOL isVariAuto( AST  astIndex ){
	return (CLASS_AUTO == stVariableInfoAccess.symClass.get( astIndex ));
}
static PSZ getVariDataSeciton( AST astIndex ){
	AST astData = stVariableInfoAccess.dataSection.get( astIndex );
	return stDataSectionAccess.name.get( astData );
}
VOID LinkVariableInit( VOID ){
//	AST  (*getMax)( VOID );
	LinkVariable.getMax = stVariableInfoAccess.getMax;
//	BOOL (*isExtern) ( AST astIndex );
	LinkVariable.isExtern = isVariExtern;
//	BOOL (*isStatic) ( AST astIndex );
	LinkVariable.isStatic = isVariStatic;
//	BOOL (*isRegister) ( AST astIndex );
	LinkVariable.isRegister = isVariRegister;
//	BOOL (*isAuto) ( AST astIndex );
	LinkVariable.isAuto = isVariAuto;
//	AST  (*getType)( AST astIndex );
	LinkVariable.getType = stVariableInfoAccess.type.get;
//	AST (*getLinkage) ( AST astIndex );
	LinkVariable.getLinkage = stVariableInfoAccess.linkage.get;
//	PSZ  (*getName)( AST astIndex );
	LinkVariable.getName = stVariableInfoAccess.name.get;
//	AST  (*getCodeScope)( AST astIndex );
	LinkVariable.getCodeScope = stVariableInfoAccess.codeScp.get;
//	AST (*getInitializerBegin) ( AST astIndex );
	LinkVariable.getInitializerBegin = stVariableInfoAccess.initialCmdBegin.get;
//	AST (*getInitializerEnd) ( AST astIndex );
	LinkVariable.getInitializerEnd = stVariableInfoAccess.initialCmdEnd.get;
//	AST (*getDataSection) ( AST astIndex );
	LinkVariable.getDataSection = getVariDataSeciton;
//	U4 (*getMemberOffsetBytes) ( AST astIndex );
	LinkVariable.getMemberOffsetBytes = stVariableInfoAccess.offset.get;
//	U4 (*getVariableLength) ( AST astIndex );
	LinkVariable.getVariableLength = stVariableInfoAccess.length.get;
//	BOOL (*isVariableSize) ( AST astIndex );
	LinkVariable.isVariableSize = stVariableInfoAccess.bSizeVariable.get;
//	AST (*getChild) ( AST astIndex );
	LinkVariable.getChild = stVariableInfoAccess.child.get;
//	AST (*getParent) ( AST astIndex );
	LinkVariable.getParent = stVariableInfoAccess.parent.get;
//	AST (*getNext) ( AST astIndex );
	LinkVariable.getNext = stVariableInfoAccess.next.get;
//	AST (*getPrev) ( AST astIndex );
	LinkVariable.getPrev = stVariableInfoAccess.prev.get;
}

TYPE_FUNCTION DLL_EXPORT  LinkFunction;
EXTERNAL_SYMBOL(LinkFunction );
static BOOL isFuncExtern( AST  astIndex ){
	return (CLASS_EXTERN == stFunctionInfoAccess.symClass.get( astIndex ));
}
static BOOL isFuncStatic( AST  astIndex ){
	return (CLASS_STATIC == stFunctionInfoAccess.symClass.get( astIndex ));
}
VOID LinkFunctionInit( VOID ){
//	AST  (*getMax)( VOID );
	LinkFunction.getMax = stFunctionInfoAccess.getMax;
//	BOOL (*isExtern) ( AST astIndex );
	LinkFunction.isExtern = isFuncExtern;
//	BOOL (*isStatic) ( AST astIndex );
	LinkFunction.isStatic = isFuncStatic;
//	AST (*getLinkage) ( AST astIndex );
	LinkFunction.getLinkage = stFunctionInfoAccess.linkage.get;
//	AST  (*getType)( AST astIndex );
	LinkFunction.getType = stFunctionInfoAccess.type.get;
//	PSZ  (*getName)( AST astIndex );
	LinkFunction.getName = stFunctionInfoAccess.name.get;
//	AST  (*getFunctionEntry)( AST astIndex );
	LinkFunction.getFunctionEntry = stFunctionInfoAccess.functionEntry.get;
//	AST  (*getFunctionExit)( AST astIndex );
	LinkFunction.getFunctionExit = stFunctionInfoAccess.functionExit.get;
//	AST  (*getCodeScope)( AST astIndex );
	LinkFunction.getCodeScope = stFunctionInfoAccess.codeScp.get;
}

TYPE_COMMANDLIST DLL_EXPORT  LinkCommandList;
EXTERNAL_SYMBOL(LinkCommandList );

static BOOL isNop (AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_NOP;
}
static BOOL isReturn( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_RETURN;
}
static BOOL isSelectValueByCondition( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_CHOOSE;
}
static BOOL isSelectValueByConditionEnd( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_CHOOSEEND;
}
static BOOL isMultiInputJoinPoint( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_CONFLUX;
}
static BOOL isJump( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_JUMP;
}
static BOOL isJudge( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_JUDGE;
}
static BOOL isSelectPathByCondition( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_BRANCH;
}
static BOOL isFunctionEntry( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_FUNCENTRY;
}
static BOOL isFunctionExit( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_FUNCEXIT;
}
static BOOL isGetOperandValue( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GETOPERAND;
}
static BOOL isGetOffsetByUnit( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GETOFFSET_UNIT;
}
static BOOL isGetOffsetByByte( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GETOFFSET;
}
static BOOL isIndirectReference( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GETMEMDATA;
}
static BOOL isGetAddress( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GETADDR;
}
static BOOL isCallFunction( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_CALL;
}
static BOOL isIncrement( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_INC;
}
static BOOL isDecrement( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_DEC;
}
static BOOL isSingleMinus( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_MINUS;
}
static BOOL isBooleanNegation( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_NEGATION;
}
static BOOL isBitNegation( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_BITNEGATION;
}
static BOOL isCast( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_CAST;
}
static BOOL isMultiplication( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_MUL;
}
static BOOL isDivision( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_DIV;
}
static BOOL isGetRemainder( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_MOD;
}
static BOOL isAddition( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_ADD;
}
static BOOL isSubtraction( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_SUB;
}
static BOOL isLeftShift( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_LSFT;
}
static BOOL isRightShift( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_RSFT;
}
static BOOL isGreaterThan( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GREATER;
}
static BOOL isGreaterThanOrEqual( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_GREATEREQUAL;
}
static BOOL isLessThan( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_LESS;
}
static BOOL isLessThanOrEqual( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_LESSEQUAL;
}
static BOOL isEqualTo( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_EQUAL;
}
static BOOL isNotEqualTo( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_UNEQUAL;
}
static BOOL isBitAnd( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_BITAND;
}
static BOOL isBitExclusiveOr( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_BITEXOR;
}
static BOOL isBitInclusiveOr( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_BITINOR;
}
static BOOL isLogicalAnd( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_LGAND;
}
static BOOL isLogicalOr( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_LGOR;
}
static BOOL isAssignTo( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_ASSIGN;
}
static BOOL isSendArgument( AST astIndex ){
	return stCmdListAccess.opKind.get( astIndex ) == ASM_CMD_ASSIGNARG;
}
static AST getNextByPath( AST astIndex, BOOL bCondition ){
	U4 kind = stCmdListAccess.opKind.get( astIndex );
	AST astResult=0;
	AST astOperand;
	switch(kind){
	case ASM_CMD_CHOOSE :
	case ASM_CMD_BRANCH  :
		/* has two next PATHs */
		if( bCondition == FALSE ){
			/* get the second one if PATH_FALSE */
			astOperand = stCmdListAccess.rightOperand.get( astIndex );
		}else{
			/* get the first one if PATH_TRUE */
			astOperand = stCmdListAccess.leftOperand.get( astIndex );
		}
		/* for BRANCH and CHOOSE, the operands are always COMMAND-LIST,
		 * so no check.
		 */
		astResult = stOperandAccess.parameter.get( astOperand );
		break;
	case ASM_CMD_JUMP  :
		/* get the jump destination  */
		astOperand = stCmdListAccess.leftOperand.get( astIndex );
		astResult = stOperandAccess.parameter.get( astOperand );
		break;
	case ASM_CMD_FUNCEXIT:
		/* it's the end of a function, should not has any next COMMAND */
		astResult = 0;
		break;
	default:
		/* no branch, just get next  */
		astResult = stCmdListAccess.next.get( astIndex );
		break;
	}
	return astResult;
}

VOID LinkCommandListInit( VOID ){
//	AST  (*getMax)( VOID );
	LinkCommandList.getMax = stCmdListAccess.getMax;
//	U4  (*getOpKind)( AST astIndex );
//	stCmdListAccess.opKind.get = stCmdListAccess.opKind.get;
	LinkCommandList.isAddition = isAddition;
	LinkCommandList.isAssignTo = isAssignTo;
	LinkCommandList.isBitAnd = isBitAnd;
	LinkCommandList.isBitExclusiveOr = isBitExclusiveOr;
	LinkCommandList.isBitInclusiveOr = isBitInclusiveOr;
	LinkCommandList.isBitNegation = isBitNegation;
	LinkCommandList.isBooleanNegation = isBooleanNegation;
	LinkCommandList.isCallFunction = isCallFunction;
	LinkCommandList.isCast = isCast;
	LinkCommandList.isDecrement = isDecrement;
	LinkCommandList.isDivision = isDivision;
	LinkCommandList.isEqualTo = isEqualTo;
	LinkCommandList.isFunctionEntry = isFunctionEntry;
	LinkCommandList.isFunctionExit = isFunctionExit;
	LinkCommandList.isGetAddress = isGetAddress;
	LinkCommandList.isGetOffsetByByte = isGetOffsetByByte;
	LinkCommandList.isGetOffsetByUnit = isGetOffsetByUnit;
	LinkCommandList.isGetOperandValue = isGetOperandValue;
	LinkCommandList.isGetRemainder = isGetRemainder;
	LinkCommandList.isGreaterThan = isGreaterThan;
	LinkCommandList.isGreaterThanOrEqual = isGreaterThanOrEqual;
	LinkCommandList.isIncrement = isIncrement;
	LinkCommandList.isIndirectReference = isIndirectReference;
	LinkCommandList.isJudge = isJudge;
	LinkCommandList.isJump = isJump;
	LinkCommandList.isLeftShift = isLeftShift;
	LinkCommandList.isLessThan = isLessThan;
	LinkCommandList.isLessThanOrEqual = isLessThanOrEqual;
	LinkCommandList.isLogicalAnd = isLogicalAnd;
	LinkCommandList.isLogicalOr = isLogicalOr;
	LinkCommandList.isMultiInputJoinPoint = isMultiInputJoinPoint;
	LinkCommandList.isMultiplication = isMultiplication;
	LinkCommandList.isNop = isNop;
	LinkCommandList.isNotEqualTo = isNotEqualTo;
	LinkCommandList.isReturn = isReturn;
	LinkCommandList.isRightShift = isRightShift;
	LinkCommandList.isSelectPathByCondition = isSelectPathByCondition;
	LinkCommandList.isSelectValueByCondition = isSelectValueByCondition;
	LinkCommandList.isSelectValueByConditionEnd = isSelectValueByConditionEnd;
	LinkCommandList.isSendArgument = isSendArgument;
	LinkCommandList.isSingleMinus = isSingleMinus;
	LinkCommandList.isSubtraction = isSubtraction;
//	AST  (*getCodeScope)( AST astIndex );
	LinkCommandList.getCodeScope = stCmdListAccess.codeScp.get;
//	AST  (*getType)( AST astIndex );
	LinkCommandList.getType = stCmdListAccess.type.get;
//	AST  (*getLeftOperand)( AST astIndex );
	LinkCommandList.getLeftOperand = stCmdListAccess.leftOperand.get;
//	AST  (*getRightOperand)( AST astIndex );
	LinkCommandList.getRightOperand = stCmdListAccess.rightOperand.get;
//	AST  (*getOutputOperand)( AST astIndex );
//	LinkCommandList.getOutputOperand = stCmdListAccess.outputOperand.get;
//	AST  (*getNext)( AST astIndex );
	LinkCommandList.getNext = stCmdListAccess.next.get;
//	AST  (*getPrev)( AST astIndex );
	LinkCommandList.getPrev = stCmdListAccess.before.get;
//	AST  (*getFunction)( AST astIndex );
	LinkCommandList.getNextByPath = getNextByPath;
	LinkCommandList.getFunction = stCmdListAccess.function.get;
#ifdef RECORD_CMDLIST_LABEL
//	PSZ  (*getCommandLabel)( AST astIndex );
	LinkCommandList.getCommandLabel = stCmdListAccess.label.get;
#endif
}

TYPE_OPERAND DLL_EXPORT  LinkOperand;
EXTERNAL_SYMBOL(LinkOperand );
static BOOL isOpVariable( AST  astIndex ){
	return (OPERAND_OBJECT == stOperandAccess.kind.get( astIndex ));
}
static BOOL isOpFunction( AST  astIndex ){
	return (OPERAND_FUNCTION == stOperandAccess.kind.get( astIndex ));
}
static BOOL isOpResult( AST  astIndex ){
	return (OPERAND_RESULT == stOperandAccess.kind.get( astIndex ));
}
static BOOL isOpConstant( AST  astIndex ){
	return (OPERAND_CONSTANT == stOperandAccess.kind.get( astIndex ));
}
static BOOL isOpString( AST  astIndex ){
	return (OPERAND_CONSTSTRING == stOperandAccess.kind.get( astIndex ));
}
VOID LinkOperandInit( VOID ){
//	AST  (*getMax)( VOID );
	LinkOperand.getMax = stOperandAccess.getMax;
//	BOOL (*isVariable)( AST );
	LinkOperand.isVariable = isOpVariable;
//	BOOL (*isFunction)( AST );
	LinkOperand.isFunction = isOpFunction;
//	BOOL (*isCommandList)( AST );
	LinkOperand.isCommandList = isOpResult;
//	BOOL (*isConstant)( AST );
	LinkOperand.isConstant = isOpConstant;
//	BOOL (*isConstString)( AST );
	LinkOperand.isConstString = isOpString;
//	AST  (*getParameter)( AST );
	LinkOperand.getParameter = stOperandAccess.parameter.get;
}

TYPE_LINKTYPEINFO DLL_EXPORT LinkTypeInfo;
EXTERNAL_SYMBOL(LinkTypeInfo );
//	BOOL (*isBasicType)( AST astIndex );
static BOOL isTBasicType( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_BASIC;
}
//	BOOL (*isArray)( AST astIndex );
static BOOL isTArray( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_ARRAY;
}
//	BOOL (*isPointer)( AST astIndex );
static BOOL isTPointer( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_POINTER;
}
//	BOOL (*isFunction)( AST astIndex );
static BOOL isTFunction( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_FUNCTION;
}
//	BOOL (*isStruct)( AST astIndex );
static BOOL isTStruct( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_STRUCT;
}
//	BOOL (*isUnion)( AST astIndex );
static BOOL isTUnion( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_UNION;
}
//	BOOL (*isEnum)( AST astIndex );
static BOOL isTEnum( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_ENUM;
}
//	BOOL (*isBitfield)( AST astIndex );
static BOOL isTBitfield( AST astIndex ){
	return stLinkTypeInfoAccess.typeKind.get(astIndex)==TYPEKIND_BITFIELD;
}
//	BOOL (*isSigned)( AST astIndex );
static BOOL isTSigned( AST astIndex ){
	return (SIGN_SIGNED & stLinkTypeInfoAccess.signFlag.get( astIndex ));
}
//	BOOL (*isUnSigned)( AST astIndex );
static BOOL isTUnSigned( AST astIndex ){
	return (SIGN_UNSIGNED & stLinkTypeInfoAccess.signFlag.get( astIndex ));
}
//	BOOL (*isLongLong)( AST astIndex );
static BOOL isTLongLong( AST astIndex ){
	return (LENGTH_LONGLONG == stLinkTypeInfoAccess.longShortFlg.get( astIndex ));
}
//	BOOL (*isLong)( AST astIndex );
static BOOL isTLong( AST astIndex ){
	return (LENGTH_LONG == stLinkTypeInfoAccess.longShortFlg.get( astIndex ));
}
//	BOOL (*isShort)( AST astIndex );
static BOOL isTShort( AST astIndex ){
	return (LENGTH_SHORT == stLinkTypeInfoAccess.longShortFlg.get( astIndex ));
}
//	BOOL (*isInteger)( AST astIndex );
static BOOL isTInteger( AST astIndex ){
	return (FLOATING_INT == stLinkTypeInfoAccess.intFloat.get( astIndex ));
}
//	BOOL (*isFloating)( AST astIndex );
static BOOL isTFloating( AST astIndex ){
	return (FLOATING_FLOAT == stLinkTypeInfoAccess.intFloat.get( astIndex ));
}
//	BOOL (*isConst)( AST astIndex );
static BOOL isTConst( AST astIndex ){
	return (TYPEQUAL_CONST&stLinkTypeInfoAccess.typeQual.get(astIndex));
}
//	BOOL (*isVolatile)( AST astIndex );
static BOOL isTVolatile( AST astIndex ){
	return (TYPEQUAL_VOLATILE&stLinkTypeInfoAccess.typeQual.get(astIndex));
}
//	BOOL (*isRestrict)( AST astIndex );
static BOOL isTRestrict( AST astIndex ){
	return  (TYPEQUAL_RESTRICT&stLinkTypeInfoAccess.typeQual.get(astIndex));
}

VOID LinkTypeInfoInit ( VOID ){
//	AST  (*getMax)( VOID );
	LinkTypeInfo.getMax = stLinkTypeInfoAccess.getMax;
//	BOOL (*isBasicType)( AST astIndex );
	LinkTypeInfo.isBasicType = isTBasicType;
//	BOOL (*isArray)( AST astIndex );
	LinkTypeInfo.isArray = isTArray;
//	BOOL (*isPointer)( AST astIndex );
	LinkTypeInfo.isPointer = isTPointer;
//	BOOL (*isFunction)( AST astIndex );
	LinkTypeInfo.isFunction = isTFunction;
//	BOOL (*isStruct)( AST astIndex );
	LinkTypeInfo.isStruct = isTStruct;
//	BOOL (*isUnion)( AST astIndex );
	LinkTypeInfo.isUnion = isTUnion;
//	BOOL (*isEnum)( AST astIndex );
	LinkTypeInfo.isEnum = isTEnum;
//	BOOL (*isBitfield)( AST astIndex );
	LinkTypeInfo.isBitfield = isTBitfield;
//	BOOL (*isSigned)( AST astIndex );
	LinkTypeInfo.isSigned = isTSigned;
//	BOOL (*isUnSigned)( AST astIndex );
	LinkTypeInfo.isUnSigned = isTUnSigned;
//	BOOL (*isLongLong)( AST astIndex );
	LinkTypeInfo.isLongLong = isTLongLong;
//	BOOL (*isLong)( AST astIndex );
	LinkTypeInfo.isLong = isTLong;
//	BOOL (*isShort)( AST astIndex );
	LinkTypeInfo.isShort = isTShort;
//	BOOL (*isInteger)( AST astIndex );
	LinkTypeInfo.isInteger = isTInteger;
//	BOOL (*isFloating)( AST astIndex );
	LinkTypeInfo.isFloating = isTFloating;
//	BOOL (*isConst)( AST astIndex );
	LinkTypeInfo.isConst = isTConst;
//	BOOL (*isVolatile)( AST astIndex );
	LinkTypeInfo.isVolatile = isTVolatile;
//	BOOL (*isRestrict)( AST astIndex );
	LinkTypeInfo.isRestrict = isTRestrict;
//	U4   (*getTypeSize)( AST astIndex );
	LinkTypeInfo.getTypeSize = stLinkTypeInfoAccess.size.get;
//	AST   (*getElementType )( AST astIndex );
	LinkTypeInfo.getElementType = stLinkTypeInfoAccess.elementType.get;
//	AST   (*getNoneQualifierType )( AST astIndex );
	LinkTypeInfo.getNoneQualifierType = CcTypeGetNoQualType;
//	AST   (*getMemberChain )( AST astIndex );
	LinkTypeInfo.getMemberChain = stLinkTypeInfoAccess.memChain.get;
//	AST   (*getTagInfo )( AST astIndex );
	LinkTypeInfo.getTagInfo = stLinkTypeInfoAccess.tagName.get;
}
const LINK_OUTPUT_FUNCTIONS DLL_EXPORT  LinkOutput = {
//		&LinkTranslationUnit,
		&LinkStrings,
		&LinkTypeInfo,
		&LinkMember,
		&LinkConstant,
		&LinkLinkage,
		&LinkVariable,
		&LinkFunction,
		&LinkCommandList,
		&LinkOperand
};
EXTERNAL_SYMBOL(LinkOutput );
